import React, { Component, PropTypes } from 'react'
import { Link } from 'react-router'


class OrderGoods extends Component{
    render(){
        const {item, index} = this.props;
        const imgUrl = item.image ? item.image.split(",")[0]:item.image
        let kong = '';
        if(index != 0) {
            kong ="order-list-between-kong";
        }
        return (
            <div className="bgf" style={{width: '100%'}}>
                <div className={kong}> </div>
                <Link to={`mall/goodsDetail`} query={{categoryCode:item.categoryCode, goodsNo: item.goodsNo, specificationNo: item.specificationNo}}  className="order-goods-box">
                    <div className="photo"><img src={imgUrl} alt={item.goodsName} /></div>
                    <div className="order-goods-list-text">
                        <div className="order-goods-list-name">{item.name}</div>
                        <div className="order-goods-list-specified">{item.specificationName}</div>
                        <div style={{marginTop: '30px', width: '100%'}}><div className="order-goods-list-price" >¥{item.price}</div><div className="order-goods-list-quantity">x{item.buyNumber}</div></div>
                    </div>
                </Link>
            </div>
        )
    }
}

export default OrderGoods